package config;

import java.io.IOException;

import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

// 动态网络模块2.5之前
public class ConfServlet extends HttpServlet{

	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		//1.得到config
		ServletConfig config = this.getServletConfig();
		//2.通过config得到参数
		System.out.println(config.getInitParameter("encoding"));
		System.out.println(config.getInitParameter("force"));
	}
}
